/***************************************************************************
 *   Copyright (C) 2007 by Vishwajeet   *
 *   vishwajeet@qcomputingproject.com   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 ***************************************************************************/
#ifndef IMAGELODER_H
#define IMAGELODER_H

#include <QtCore>

#include <QObject>
#include <QFutureWatcher>
#include <QHash>
#include <QImage>

/**
	@author Vishwajeet <vishwajeet@qcomputingproject.com>
*/
class ImageLoder : public QObject
  {
    Q_OBJECT
  public:
    ImageLoder(QObject *parent = 0);

    ~ImageLoder();

  public slots:
    void loadImages(const QStringList &list);
    void doneLoading(int);
    void finished();

  signals:
    void imageLoadedInStorage(int);

  private:

    QFutureWatcher<QImage> *imageScaling;
    QHash<int,QImage> imageStorage;
  };

#endif
